# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=libdatovka
pkgver=0.3.0
pkgrel=3
pkgdesc="ISDS client library"
arch=('loong64' 'x86_64')
url="https://www.datovka.cz/cs/pages/libdatovka.html"
license=('LGPL')
depends=('libxml2' 'openssl' 'curl')
makedepends=('docbook-xsl')
source=(https://secure.nic.cz/files/datove_schranky/$pkgname/$pkgname-$pkgver.tar.xz)
sha256sums=('c69905a1be69774a6956a8145c1631d453de162caaef1769c692501c2340261b')

build() {
  cd "${srcdir}"/$pkgname-$pkgver

  ./configure --prefix=/usr \
    --with-docbook-xsl-stylesheets=/usr/share/xml/docbook/xsl-stylesheets-1.79.2 \
    --enable-openssl-backend  # https://gitlab.nic.cz/datovka/datovka/-/issues/599
  make
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver

  make DESTDIR="${pkgdir}" install
}
